﻿<?php
    //header('Content-Type: text/html; charset=utf8');
    //============================================================
    // USSAGE add.php?name=trappa2&time=2522&amount=102&price=6.01
    //============================================================
    require('class.mysql.php');
	
    $stock = $_GET['name'];
    $time = $_GET['time'];
    $price = $_GET['price'];
    $num = $_GET['amount'];
    if(!($stock && $time && $price && $num)){
        die("Provide correct values!");
    }
    
    $db = new Mysql($_GET['table']);
    $db->addEntry($stock, $time, $num, $price);
?>
   